package com.jerry.api.controller;

import com.jerry.api.common.PageUtils;
import com.jerry.api.common.Query;
import com.jerry.api.common.R;
import com.jerry.api.entity.SysGroupEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 群组管理
 * 
 * @author jerryChan
 * @email 670809626@qq.com
 *
 */
@RestController
@RequestMapping("sys/group")
public class SysGroupController {
	/**
	 * 列表
	 */
	@RequestMapping("/list")
	public R list(@RequestParam Map<String, Object> params) throws Exception {
		//查询列表数据
        Query query = new Query(params);
		PageUtils pageUtil = new PageUtils(null, 0, query.getLimit(), query.getPage());
		return R.ok().put("page", pageUtil);
	}
	
	
	/**
	 * 信息
	 */
	@RequestMapping("/info/{groupId}")
	public R info(@PathVariable("groupId") Long groupId){
		return R.ok().put("sysGroup", null);
	}
	
	/**
	 * 保存
	 */
	@RequestMapping("/save")
	public R save(@RequestBody SysGroupEntity sysGroup){
		return R.ok();
	}
	
	/**
	 * 修改
	 */
	@RequestMapping("/update")
	public R update(@RequestBody SysGroupEntity sysGroup){
		return R.ok();
	}
	
	/**
	 * 删除
	 */
	@RequestMapping("/delete")
	public R delete(@RequestBody Long[] groupIds){
		return R.ok();
	}
	
}
